package nl.infodation.emr.pricingservice.ui.component;

import java.util.Locale;

import net.atontech.vaadin.ui.numericfield.NumericField;
import net.atontech.vaadin.ui.numericfield.widgetset.shared.NumericFieldType;

public class ComponentFactory {

	static public NumericField createDoubleField() {
		NumericField doubleField = new NumericField();
		doubleField.setNumberType(NumericFieldType.DOUBLE);
		doubleField.setScale(3);
		doubleField.addValidator(Locale.ENGLISH);
		return doubleField;
	}
	
	static public NumericField createIntegerField() {
		NumericField integerField = new NumericField();
		integerField.setNumberType(NumericFieldType.INTEGER);
		integerField.addValidator(Locale.ENGLISH);
		return integerField;
	}
	
}
